package com.sandasai.action.admin;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;
import com.sandasai.service.AdminManager;
import com.sandasai.vo.PageBean;
@Controller
@Scope("prototype")
public class SetStudentStateAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Resource
	private AdminManager adminManager;
	private int id;
	private int isPass;
	private int page;
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	private PageBean pageBean;
	public PageBean getPageBean() {
		return pageBean;
	}

	public void setPageBean(PageBean pageBean) {
		this.pageBean = pageBean;
	}

	public int getIsPass() {
		return isPass;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setIsPass(int isPass) {
		this.isPass = isPass;
	}
	
	public String execute()throws Exception{
		this.adminManager.setStudentState(id, isPass);
		pageBean = this.adminManager.queryForPageSt(10, page);
		return SUCCESS;
	}
}
